import { post, get } from "utils/fetch";

// 渠道列表查询
export const getChannelList = ({ keyWord, pageNum, pageSize }) => {
  return post(`/flow-platform/notice/channel/list`, {
    keyWord,
    pageNum,
    pageSize,
  });
};

// 渠道新增
export const addChannel = (data) =>
  post(`/flow-platform/notice/channel/add`, data, { messageType: "close" });

// 渠道编辑
export const editChannel = (data) =>
  post(`/flow-platform/notice/channel/edit`, data, { messageType: "close" });

// 渠道删除
export const deleteChannel = (data) =>
  get(`/flow-platform/notice/channel/delete`, data, { messageType: "close" });

// 渠道详情
export const detailChannel = (data) =>
  get(`/flow-platform/notice/channel/detail`, data, { messageType: "close" });

// 状态启用
export const startStatus = (data) =>
  post(`/flow-platform/notice/channel/startStatus`, data, {
    messageType: "close",
  });

// 渠道类型列表查询
export const getChannelType = () =>
  get(`/flow-platform/notice/channel/getNoticeChannelType`);
